class Solution(object):
    def isPowerOfFour(self, num):
        """
        :type num: int
        :rtype: bool
        """
        if num>0:
            while num&0b11==0: num>>=2
            return num==1
        return False